<?php

// Google Maps V3 Key = AIzaSyCjTtPRLjvSNJb6VnrGTGyIOO5DQQWTvx4

$ipAdressen = array(
    '127.0.0.1'
 );

if(!in_array($_SERVER['REMOTE_ADDR'],$ipAdressen)) {
    echo 'No authorization.' . $_SERVER['REMOTE_ADDR'];
    exit;
}

session_start();

# Path settings
$GLOBALS['templatePath'] = 'templates/';
$GLOBALS['cssPath'] = 'css/';
$GLOBALS['javascriptPath'] = 'javascript/';

# Version settins
$GLOBALS['jqueryVersion'] = '1.7.1';

switch($_SERVER['SERVER_NAME']) {
    case 'localhost':

        error_reporting(1);

        # Database credentials
        $host = 'localhost';
        $username = 'root';
        $password = '';
        $database = 'itract';

        $libaryPath = '../libary/';

        break;

}

# Make a database connection
$databaseConnection = mysql_connect($host, $username, $password);
mysql_select_db($database, $databaseConnection);

# Get the autoloader
include($GLOBALS['libaryPath'] . 'classlib.php');

if(!isset($cronjob) || $cronjob == false) {
    # Add folders for the autoloader
    addAutoloadFolder('database/');
    addAutoloadFolder('cronjob/');
    addAutoloadFolder('applications/');
    addAutoloadFolder('forms/');
    addAutoloadFolder('rest/');
}

$GLOBALS['googleMapsV3Key'] = 'AIzaSyCjTtPRLjvSNJb6VnrGTGyIOO5DQQWTvx4';

?>
